package cn.school.controller.logistics;

import cn.school.common.api.CommonResult;
import cn.school.logistics.service.AssetsCategoryService;
import cn.school.logistics.vo.AssetsCategoryTreeNode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @className: AssetsCategoryController
 * @author: fangjin.tao
 * @date: 2022/12/10
 **/
@RestController
@Api(tags = "AssetsCategoryController => 资产分类管理")
@RequestMapping("/logistics/assetsCategory")
public class AssetsCategoryController {
	@Autowired
	private AssetsCategoryService assetsCategoryService;
	
	
	@ApiOperation("【资产分类】树")
	@GetMapping("/list")
	public CommonResult<List<AssetsCategoryTreeNode>> list(@RequestParam Map<String, Object> params) {
		// 查询
		List<AssetsCategoryTreeNode> list = assetsCategoryService.getAll();
		
		return CommonResult.success(list);
	}
}
